import service from '@/utils/request'

// @Tags DrawingCategory
// @Summary 创建图纸分类库
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.DrawingCategory true "创建图纸分类库"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /drawingCategory/createDrawingCategory [post]
export const createDrawingCategory = (data) => {
  return service({
    url: '/drawingCategory/createDrawingCategory',
    method: 'post',
    data
  })
}

// @Tags DrawingCategory
// @Summary 删除图纸分类库
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.DrawingCategory true "删除图纸分类库"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /drawingCategory/deleteDrawingCategory [delete]
export const deleteDrawingCategory = (params) => {
  return service({
    url: '/drawingCategory/deleteDrawingCategory',
    method: 'delete',
    params
  })
}

// @Tags DrawingCategory
// @Summary 批量删除图纸分类库
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除图纸分类库"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /drawingCategory/deleteDrawingCategory [delete]
export const deleteDrawingCategoryByIds = (params) => {
  return service({
    url: '/drawingCategory/deleteDrawingCategoryByIds',
    method: 'delete',
    params
  })
}

// @Tags DrawingCategory
// @Summary 更新图纸分类库
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.DrawingCategory true "更新图纸分类库"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /drawingCategory/updateDrawingCategory [put]
export const updateDrawingCategory = (data) => {
  return service({
    url: '/drawingCategory/updateDrawingCategory',
    method: 'put',
    data
  })
}

// @Tags DrawingCategory
// @Summary 用id查询图纸分类库
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.DrawingCategory true "用id查询图纸分类库"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /drawingCategory/findDrawingCategory [get]
export const findDrawingCategory = (params) => {
  return service({
    url: '/drawingCategory/findDrawingCategory',
    method: 'get',
    params
  })
}

// @Tags DrawingCategory
// @Summary 分页获取图纸分类库列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取图纸分类库列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /drawingCategory/getDrawingCategoryList [get]
export const getDrawingCategoryList = (params) => {
  return service({
    url: '/drawingCategory/getDrawingCategoryList',
    method: 'get',
    params
  })
}

// 通过款式编号获取尺码和配件编号
export const getSizesAndSpecs = (params) => {
  return service({
    url: '/productSpec/getSizesAndSpecs',
    method: 'get',
    params
  })
}
// 获取审批流
export const getWorkflowDefList = (params) => {
  return service({
    url: '/WorkflowDef/getWorkflowDefList',
    method: 'get',
    params
  })
}
